//
//  SceneryDetailCell.m
//  OnePiece
//
//  Created by lanou on 15/10/29.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "SceneryDetailCell.h"

@implementation SceneryDetailCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _lineNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 0, 100, 30)];
        _lineNameLabel.textColor = [UIColor grayColor];
        _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 30, SCREEN_WIDTH-20, 0)];
        _contentLabel.textColor = [UIColor grayColor];
        _contentLabel.font = [UIFont systemFontOfSize:14];
        _contentLabel.numberOfLines = 0;
        
        [self.contentView addSubview:_lineNameLabel];
        [self.contentView addSubview:_contentLabel];
    }
    return self;
}

+ (CGFloat)heightOfString:(NSString *)string
{
    NSDictionary *dic = [NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:14]forKey:NSFontAttributeName];
    CGRect bounds = [string boundingRectWithSize:CGSizeMake(SCREEN_WIDTH-20, 0) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    
    return bounds.size.height;
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
